package md.midlet;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import md.canvas.MainGameCanvas;

public class GameMidlet extends MIDlet {

	MainGameCanvas gameCanvas;
	
	public GameMidlet() {
		gameCanvas = new MainGameCanvas();
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		gameCanvas.stop();
	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {
		Display d = Display.getDisplay(this);
		d.setCurrent(gameCanvas);
		gameCanvas.start();
	}

}
